import { request } from '../utils/request'
// 获取图形验证码
export function getImageCaptcha(data = {}) {
  return request({
    url: '/portal/auth/getImageCaptcha',
    data,
    method: 'GET'
  });
}

// 发送验证码
export function getSmsCodeByImgCaptcha(data = {}) {
  return request({
    url: '/portal/auth/getSmsCodeByImgCaptcha',
    data
  });
}

// 登录注册
export function bpaiLogin(data = {}) {
  return request({
    url: '/portal/auth/bpai/login',
    data
  });
}

// 用户信息
export function getUserInfoFromMobile(data = {}) {
  return request({
    url: '/eims/BPai/V2/getCurrent',
    data
  });
}
// 根据Code获取手机号
export function getWechatProPhoneIdByCode(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getWechatProPhoneIdByCode',
    data
  });
}

// 消息记录
export function queryPageMsg(data = {}) {
  return request({
    url: '/eims/BPai/queryPageMsg',
    data
  });
}

// BPai个人信息查询
export function personInfo(data = {}) {
  return request({
    url: '/eims/BPai/personInfo',
    data
  });
}

// 保存记录
export function bpSaveMsg(data = {}) {
  return request({
    url: '/eims/BPai/saveMsg',
    data
  });
}

// 根据Code获取OpenId
export function getWechatProOpenIdIdByCode(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getWechatProOpenIdIdByCode',
    data
  });
}

// BPai支付参数
export function bpPay(data = {}) {
  return request({
    url: '/eims/BPai/pay',
    data
  });
}

// 获取渠道配置
export function channelConfig(data = {}) {
  return request({
    url: '/eims/invoice/salesInfo/channelConfig',
    data
  });
}

// 获取不限制的小程序码
export function getUnlimitedQRCode(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getUnlimitedQRCode',
    data
  });
}

// 获取海报
export function getPicQRCode(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getPicQRCode',
    data
  });
}

// 获取海报scene信息
export function getSceneBySceneId(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getSceneBySceneId',
    data
  });
}

// 数据埋点
export function generalTrackEvent(data = {}) {
  return request({
    url: '/eims/tracking/generalTrackEvent',
    data
  });
}

// 根据手机号获取分享编码
export function getCodeByPhone(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getCodeByPhone',
    data
  });
}

// 获取活动配置
export function getActivityConfig(data = {}) {
  return request({
    url: '/portal/enterprise/taxes/user/getActivityConfig',
    data
  });
}